package com.o2opuzi.lib.util;

import org.springframework.util.StringUtils;

public class DoubleFormatUtils {
	
	public static String formt(Double value){
		if(StringUtils.isEmpty(value)){
			return "0.00";
		}
		return  String.format("%.2f", value);
	}
	
	public static String formt(String value){
		return formt(Double.parseDouble(value));
	}
	
	public static Double formtDouble(String value){
		return Double.parseDouble(formt(value));
	}
	
	public static Double formtDouble(Double value){
		return Double.parseDouble(formt(value));
	}
	
}
